package wyyProj1;

import java.util.HashMap;

class Student{
	
	int id;
	String name;
//	@Override
//	public int hashCode() {
//		final int prime = 31;
//		int result = 1;
//		result = prime * result + id;
//		return result;
//	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Student other = (Student) obj;
		if (id != other.id)
			return false;
		return true;
	}
	public Student(int id, String name) {
		super();
		this.id = id;
		this.name = name;
	}
	
}

public class HelloWorld {

	public static void main(String[] args) {
		
		HashMap<Student, String> hs = new HashMap<>();
		hs.put(new Student(1, "aa"), "aa");
		hs.put(new Student(1, "aa"), "bb");
		System.out.println(hs.size());
	}

}
